package net.zabuchy.user.dao;
 
import java.util.List;

import org.springframework.security.access.annotation.Secured;
 
import net.zabuchy.UserRole.entity.User_roles;
import net.zabuchy.user.entity.User;
 
public interface UserDao {
 
    void add(User user);
 
    void update(User user);
 
    void delete(User user);
 
    @Secured({"ROLE_ADMIN"})
    List findAll();
 
    User findById(int id);
 
    List findByCustomerId(int id);
    
    User findByUsername(String username);
    
    String getUserRole(User user);
    
    void updateUserRole(User user, String role);
    
    List<User_roles> findUserRoles();
    
    void addUserRole(String role, int userId);
}